import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

// import LoginPage from '../views/login/loginPage.vue'
// import Layout from '@/layout/index.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        redirect: '/home',
    },
    {
        path: '/home',
        name: 'home',
        component:  () => import(/* webpackChunkName: "about" */ '@/views/home/home.vue'),
        meta: {
            title: '旅游'
        }
    },
    {
        path: '/train',
        name: 'train',
        component:  () => import(/* webpackChunkName: "about" */ '@/views/train/index.vue'),
        meta: {
            title: '火车'
        }
    },
    {
        path: '/aircraft',
        name: 'aircraft',
        component:  () => import(/* webpackChunkName: "about" */ '@/views/aircraft/index.vue'),
        meta: {
            title: '飞机'
        }
    },
    {
        path: '/lowCode',
        name: 'lowCode',
        component:  () => import(/* webpackChunkName: "about" */ '@/views/lowCode/index.vue'),
        meta: {
            title: '问卷设计'
        }
    },
    {
        path: '/questionPage',
        name: 'questionPage',
        component:  () => import(/* webpackChunkName: "about" */ '@/views/questionPage/index.vue'),
        meta: {
            title: '问卷列表'
        }
    },
]

const router = createRouter({
  history: createWebHashHistory(process.env.BASE_URL),
  routes
})

export default router
